package com.lvshi0797.cms.dto;

import java.util.Date;

import com.lvshi0797.cms.entities.FBaseInfo;
import com.lvshi0797.cms.entities.FManager;

public class BaseInfoDto {
	
	private int id;
	/**
	 * 户主名
	 */
	private String huzhuName;
	/**
	 * 家庭人口
	 */
	private int totalNum;
	/**
	 * 残疾人口
	 */
	private int disaNum;
	/**
	 * 贫困属性
	 */
	private String poorShuxing;
	/**
	 * 主要致贫原因
	 */
	private String poorCause;
	/**
	 * 主要收入来源
	 */
	private String mainIncome;
	/**
	 * 上年度人均纯收入 （元）
	 */
	private int lastPerIncome;
	/**
	 * 是否脱贫，0表示没有，1表示已脱贫。默认为0
	 */
	private int isOutPoor;
	/**
	 * 脱贫时间
	 */
	private String outPoorDate;
	/**
	 * 脱贫方式
	 */
	private String outPoorWay;
	/**
	 * 家庭地址：所属乡镇
	 */
	private String town;
	/**
	 * 家庭地址：所属村
	 */
	private String vallige;
	/**
	 * 家庭地址：所属组
	 */
	private String team;
	/**
	 * 联系电话
	 */
	private String contact;



	private int baseInfoId;

	private FBaseInfo baseInfo;
	
	private FManager manager;

	public FBaseInfo getBaseInfo() {
		FBaseInfo b = new FBaseInfo(huzhuName, totalNum, disaNum, poorShuxing,
				poorCause, mainIncome);
		b.setAddTime(new Date());
		b.setId(baseInfoId);
		b.setLastPerIncome(lastPerIncome);
		b.setIsOutPoor(isOutPoor);
		b.setOutPoorDate(outPoorDate);
		b.setOutPoorWay(outPoorWay);
		b.setTown(town);
		b.setVallige(vallige);
		b.setTeam(team);
		b.setContact(contact);
		b.setManager(manager);
		b.setId(baseInfoId);
		return b;
	}

	public void setBaseInfo(FBaseInfo baseInfo) {
		this.setBaseInfoId(baseInfo.getId());
		this.setContact(baseInfo.getContact());
		this.setDisaNum(baseInfo.getDisaNum());
		this.setHuzhuName(baseInfo.getHuzhuName());
		this.setIsOutPoor(baseInfo.getIsOutPoor());
		this.setLastPerIncome(baseInfo.getLastPerIncome());
		this.setMainIncome(baseInfo.getMainIncome());
		this.setOutPoorDate(baseInfo.getOutPoorDate());
		this.setOutPoorWay(baseInfo.getOutPoorWay());
		this.setPoorCause(baseInfo.getPoorCause());
		this.setPoorShuxing(baseInfo.getPoorShuxing());
		this.setTeam(baseInfo.getTeam());
		this.setTotalNum(baseInfo.getTotalNum());
		this.setTown(baseInfo.getTown());
		this.baseInfo = baseInfo;
	}
	public int getBaseInfoId() {
		return baseInfoId;
	}

	public void setBaseInfoId(int baseInfoId) {
		this.baseInfoId = baseInfoId;
	}
	
	

	public FManager getManager() {
		return manager;
	}

	public void setManager(FManager manager) {
		this.manager = manager;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getHuzhuName() {
		return huzhuName;
	}

	public void setHuzhuName(String huzhuName) {
		this.huzhuName = huzhuName;
	}

	public int getTotalNum() {
		return totalNum;
	}

	public void setTotalNum(int totalNum) {
		this.totalNum = totalNum;
	}

	public int getDisaNum() {
		return disaNum;
	}

	public void setDisaNum(int disaNum) {
		this.disaNum = disaNum;
	}

	public String getPoorShuxing() {
		return poorShuxing;
	}

	public void setPoorShuxing(String poorShuxing) {
		this.poorShuxing = poorShuxing;
	}

	public String getPoorCause() {
		return poorCause;
	}

	public void setPoorCause(String poorCause) {
		this.poorCause = poorCause;
	}

	public String getMainIncome() {
		return mainIncome;
	}

	public void setMainIncome(String mainIncome) {
		this.mainIncome = mainIncome;
	}

	public int getLastPerIncome() {
		return lastPerIncome;
	}

	public void setLastPerIncome(int lastPerIncome) {
		this.lastPerIncome = lastPerIncome;
	}

	public int getIsOutPoor() {
		return isOutPoor;
	}

	public void setIsOutPoor(int isOutPoor) {
		this.isOutPoor = isOutPoor;
	}

	public String getOutPoorDate() {
		return outPoorDate;
	}

	public void setOutPoorDate(String outPoorDate) {
		this.outPoorDate = outPoorDate;
	}

	public String getOutPoorWay() {
		return outPoorWay;
	}

	public void setOutPoorWay(String outPoorWay) {
		this.outPoorWay = outPoorWay;
	}

	public String getTown() {
		return town;
	}

	public void setTown(String town) {
		this.town = town;
	}

	public String getVallige() {
		return vallige;
	}

	public void setVallige(String vallige) {
		this.vallige = vallige;
	}

	public String getTeam() {
		return team;
	}

	public void setTeam(String team) {
		this.team = team;
	}

	public String getContact() {
		return contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}

	public BaseInfoDto() {
		super();
		// TODO Auto-generated constructor stub
	}

	public BaseInfoDto(FBaseInfo baseInfo) {
		this.setBaseInfoId(baseInfo.getId());
		this.setContact(baseInfo.getContact());
		this.setDisaNum(baseInfo.getDisaNum());
		this.setHuzhuName(baseInfo.getHuzhuName());
		this.setIsOutPoor(baseInfo.getIsOutPoor());
		this.setLastPerIncome(baseInfo.getLastPerIncome());
		this.setMainIncome(baseInfo.getMainIncome());
		this.setOutPoorDate(baseInfo.getOutPoorDate());
		this.setOutPoorWay(baseInfo.getOutPoorWay());
		this.setPoorCause(baseInfo.getPoorCause());
		this.setPoorShuxing(baseInfo.getPoorShuxing());
		this.setTeam(baseInfo.getTeam());
		this.setTotalNum(baseInfo.getTotalNum());
		this.setTown(baseInfo.getTown());
		this.baseInfo = baseInfo;
	}
	
	

}
